$(document).ready(function(){
    $('button').click(function(){
        var ala = $(this);
        var determine = '';
        if(ala.attr("class") === 'hit'){
            determine = 'over';
        }
        $.ajax({
            url:'/list',
            type:'post',
            data:{'determine':determine},
            success:function (result) {
                console.log(result.number)
                if(result.number <=0){
                    window.location.href='/shop';
                }

            }
        })
    })
})